#!/usr/bin/python
#coding = utf-8

# Email config
EMAIL_FROM = '###'
EMAIL_PASSWORD = '###'
EMAIL_TO = '###'
EMAIL_SMTP_SERVER = 'smtp.163.com'
EMAIL_CHARSET = 'utf-8'
EMAIL_PORT = 25

#logger config
LOG_NAME = 'onlive_crawler'
BASIC_LOG_PATH = './log/'
LOG_FILENAME = 'onlive_crawler.log'

#mysql config
DB_HOST = '127.0.0.1'
DB_USER = 'root'
DB_PASSWD = '###'
DB_CHARSET = 'utf8'
DB_NAME = '##'

#gevent and requests config
GPOOLSIZE = 10
TIMEOUT = 5
HEADERS = {}
USER_AGENT = ''
CONNECT_TIME = 1

# huomao TV
HUOMAO_API = "http://www.huomaotv.com/channel/all?ajax=1&p=%d"
HUOMAO_GAME = {'17':'lol', '23':'dota2', '13':'hearthstone', '11':'starcraft', '53':'zhuji'}
HUOMAO_VIEW = "http://www.huomaotv.com/live/%s"

# longzhu TV
LONGZHU_API = "http://api.plu.cn/tga/streams/?game=0&max-results=%d&start-index=%d&sort-by=top&filter=0"
LONGZHU_GAME = {'lol':'lol', 'cf':'cf', 'smite':'smite', 'sc':'starcraft', 'pcconsole':'zhuji', 'minecraft':'minecraft'}
LONGZHU_VIEW = "http://star.longzhu.com/%s"

# panda TV
PANDA_API = "http://www.panda.tv/live_lists?status=2&order=person_num&pagenum=30&pageno=%d"
PANDA_GAME = {'lol':'lol', 'dota2':'dota2', 'hearthstone':'hearthstone', 'starcraft':'starcraft', 'zhuji':'zhuji'}
PANDA_VIEW = "http://www.panda.tv/%s"

# huya TV
HUYA_API = "http://www.huya.com/index.php?m=Live&do=ajaxAllLiveByPage&page=%d"
HUYA_GAME = {'lol':'lol', 'cf':'cf', 'minecraft':'minecraft', 'dota2':'dota2', 'hearthstone':'hearthstone', 'wow':'wow', 'starcraft':'starcraft', '1123':'diablo'}
HUYA_VIEW = "http://www.huya.com/%s"

# douyu TV
DOUYU_API = "http://www.douyutv.com/directory/isgame?page=%d"
DOUYU_GAME = {u'英雄联盟':'lol', u'穿越火线':'cf', u'我的世界':'minecraft', 'DOTA2':'dota2', u'炉石传说':'hearthstone', u'魔兽世界':'wow', u'星际争霸':'starcraft', u'暗黑破坏神3':'diablo'}
DOUYU_VIEW = "http://www.douyutv.com/%s"

# twitch TV
TWITCH_API = "http://streams.twitch.tv/kraken/streams?limit=%d&offset=%d&broadcaster_language=&on_site=1"
TWITCH_GAME = {'League of Legends':'lol', 'Dota 2':'dota2', 'Hearthstone: Heroes of Warcraft':'hearthstone', 'Counter-Strike: Global Offensive':'cs', }
TWITCH_VIEW = "http://www.twitch.tv/%s"

#worker config
INTERVAL = 1

#proxy config
PROXY_EXPIRETIME = 10


IGNORE_SUFFIXES = set(['.jpg', '.jpeg', '.png', '.gif', '.pdf'])
